<template>
    <div>
        {{value}}
        <button @click="changeName">change</button>

    </div>
</template>
<script>
export default {
    methods:{
        changeName(){
            //危险 不推荐
            //console.log(this.$parent,"找不着")
            //v-model: :value @input
            this.$emit("input","我猜对了")
        },
    },
    props:{
        value:{
            type:String,
            default:"哈哈哈"
        }
    }
}
</script>